package com.wct.demo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author WEI (Email:changtan20000@163.com)
 * @description
 * @date: 2019/12/18 21:20
 */
@Data
@ColumnWidth(12)
public class BankTask {
    // 等待序号
    @ExcelProperty(value = "排队序号")
    private Long id;
    // 业务类型
    @ExcelProperty(value = "业务类型")
    private String type;
    // 办理窗口
    @ExcelProperty(value = "办理窗口")
    @ColumnWidth(20)
    private String processWindows;
    // 等待开始时间
    @ExcelProperty(value = "等待开始时间", converter = LocalDateTimeConverter.class)
    @LocalDateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ColumnWidth(25)
    private LocalDateTime waitStartTime;
    // 办理开始时间
    @ExcelProperty(value = "办理开始时间", converter = LocalDateTimeConverter.class)
    @LocalDateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ColumnWidth(25)
    private LocalDateTime processStartTime;
    // 办理结束时间
    @ExcelProperty(value = "办理结束时间", converter = LocalDateTimeConverter.class)
    @LocalDateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ColumnWidth(25)
    private LocalDateTime processEndTime;

    public Object[] toObjectArray(){
        Object[] objs = new Object[6];
        objs[0] = id;
        objs[1] = type;
        objs[2] = processWindows;
        objs[3] = waitStartTime;
        objs[4] = processStartTime;
        objs[5] = processEndTime;
        return objs;
    }
}
